package com.wholesale.beans;

import java.util.UUID;

import org.json.JSONObject;

public class LoginRequest {
	private String password ;
	private String requestId ;
	private String userId ;
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getRequestId() {
		return requestId;
	}
	public void setRequestId(String requestId) {
		this.requestId = requestId;
	}
	public String getUserId() {
		return userId;
		
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
	public String toJsonString(){
		JSONObject loginObject = new JSONObject();
		try {
			loginObject.put("userId", userId);
			loginObject.put("password", password);
			if(requestId == null){
				UUID uuid = UUID.randomUUID();
				requestId = uuid.toString();
			}
			loginObject.put("requestId", requestId);
			loginObject.toString();
		} catch (Exception e) {
		}
		return loginObject.toString();
	}
}
